package com.tuling.mall.feign.controller;

import com.tuling.mall.common.R;
import com.tuling.mall.feign.api.OrderFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {


    @Autowired
    private OrderFeignService orderFeignService;

    @RequestMapping("/findOrder/{userId}")
    public R findOrderByUserId(@PathVariable("userId") Integer userId) {
        return orderFeignService.findOrderByUserId(userId);
    }

}
